<template>
  <div>
    <p>我是一个组件，通过路由显示</p>
    <p>导航到当前地址</p>
    <router-link to="/view1" tag="button">view1</router-link>
    <button @click="change('/view1')">view1</button>
  </div>
</template>
<script>
export default {
  methods: {
    change(path) {
      this.$router.push(path);
    }
  }
}
</script>
<style lang="">
  
</style>